message(STATUS "Building EGL")

option(EGL_ONLY_PBUFFER "Support only Pixel Buffer Surface" OFF)
if(EGL_ONLY_PBUFFER)
    message(STATUS "EGL_ONLY_PBUFFER ${EGL_ONLY_PBUFFER}")
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DEGL_SUPPORT_ONLY_PBUFFER_SURFACE")
    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DEGL_SUPPORT_ONLY_PBUFFER_SURFACE")
endif()

if(WIN32)
    add_definitions(-DKHRONOS_DLL_EXPORTS)
endif()

install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/EGL DESTINATION ${CMAKE_INSTALL_FULL_INCLUDEDIR})

add_subdirectory(source)
